﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using CashFlow.ShopManage.Def;
using CashFlow.Db.Entity;

namespace CashFlow.ShopManage.Service
{
    public interface IUserService : IService<UserInfoEntity>
    {
        IList<UserInfoEntity> QueryShopAllUsersByShopManagerUserId(
            int shopManagerUserId
            , int? state);

        IList<int> QueryShopAllUsersIdByShopManagerUserId(
            int shopManagerUserId
            , int? state);

        IList<UserInfoAndReferenceUserInfo> QueryShopAllUsersByShopManagerUserId2(
            int shopManagerUserId
            , int? state);

        IList<UserInfoEntity> QueryShopAllUsersByUserId(
            int userId
            , int? state);

        IList<UserInfoAndReferenceUserInfo> QueryShopAllUsersByShopManagerUserIdByWhere(
            int shopManagerUserId
            , string phone
            , string name
            , string invitationCode
            , string reference
            , string referenceInvitationCode
            , int? state);

        UserInfoEntity QueryByInvitationCode(int shopManagerUserId
            , string invitationCode);

        EUpdateUserResult UpdateUser(int userId, string phone, string name);

        bool ResetPwd(int userId, string newPwd);

        bool UpdateShopManagerLevelPercent(int userId, decimal percent);

        bool UpdateUserState(int userId, int state);

        bool UpdateUserReferenceInvitationCode(int userId, string invitationCode);
    }
}
